package com.example.jetpack;

import android.app.Activity;
import android.view.KeyEvent;

import androidx.annotation.NonNull;
import androidx.core.view.KeyEventDispatcher;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleRegistry;

public class SupportActivity extends Activity implements LifecycleOwner, KeyEventDispatcher.Component {

    private LifecycleRegistry mLifecycleRegistry =
            new LifecycleRegistry(this);
    public SupportActivity(){

    }
    @Override
    public boolean superDispatchKeyEvent(KeyEvent event) {
        return false;
    }

    @NonNull
    @Override
    public Lifecycle getLifecycle() {
        return this.mLifecycleRegistry;
    }
}
